/// 交易状态
class TransactionState {
  final int value;

  const TransactionState._(this.value);

  ///初始状态
  static const CREATED = TransactionState._(1);

  /// 交易已开始
  static const VOIDSTARTED = TransactionState._(2);

  ///发生初始化错误
  static const INIT_ERROR = TransactionState._(3);

  ///付款进行中
  static const IN_PROGRESS = TransactionState._(5);

  ///付款完成
  static const COMPLETED = TransactionState._(6);

  /// 付款已取消
  static const CANCELLED = TransactionState._(7);

  ///全局错误
  static const ERROR = TransactionState._(8);

  // 所有可能值
  static const values = [
    CREATED,
    VOIDSTARTED,
    INIT_ERROR,
    IN_PROGRESS,
    COMPLETED,
    ERROR
  ];
}
